package com.TwinBlade.PicturePassword;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.View;
import android.view.Window;

public class LockActivity extends Activity
{
  private static Activity b;
  private static Window c;
  private static View d;
  private static boolean e = false;
  private SharedPreferences a;
  private final BroadcastReceiver f = new ai(this);

  public static void a()
  {
    if (c != null)
    {
      c.clearFlags(2097152);
      c.clearFlags(4194304);
    }
  }

  public static void a(boolean paramBoolean)
  {
    if (d != null)
    {
      if (!paramBoolean)
        break label52;
      d.setBackgroundColor(Color.argb(255, 0, 0, 0));
    }
    while (true)
    {
      if (c != null)
      {
        if (!paramBoolean)
          break;
        c.clearFlags(16);
        c.clearFlags(8);
      }
      return;
      label52: d.setBackgroundColor(Color.argb(0, 0, 0, 0));
    }
    c.setFlags(16, 16);
    c.setFlags(8, 8);
  }

  public static void b()
  {
    if (c != null)
      c.addFlags(6291456);
  }

  public static void c()
  {
    if (b != null)
    {
      Utilities.a("LOCK ACTIVITY EXIT");
      b.finish();
      b.overridePendingTransition(0, 0);
    }
  }

  public static boolean d()
  {
    return e;
  }

  private boolean e()
  {
    Intent localIntent = getIntent();
    if (localIntent == null);
    Bundle localBundle;
    do
    {
      return false;
      localBundle = localIntent.getExtras();
    }
    while (localBundle == null);
    return localBundle.getBoolean("OnBoot");
  }

  public void onCreate(Bundle paramBundle)
  {
    this.a = PreferenceManager.getDefaultSharedPreferences(this);
    String str = this.a.getString("ForceOrientation", "0");
    if (str.equals("0"))
      if (!Utilities.a())
        setRequestedOrientation(1);
    while (true)
    {
      super.onCreate(paramBundle);
      d = new View(this);
      d.setBackgroundColor(Color.argb(0, 0, 0, 0));
      this.a = PreferenceManager.getDefaultSharedPreferences(this);
      boolean bool1 = this.a.getBoolean("DisplayStockLockscreen", false);
      boolean bool2 = this.a.getBoolean("EasyWake", true);
      if (((!bool1) && (bool2)) || (e()))
        getWindow().setFlags(4194304, 4194304);
      setContentView(d);
      b = this;
      c = getWindow();
      a(false);
      Utilities.a = false;
      Utilities.a("LOCK ACTIVITY CREATED");
      return;
      setRequestedOrientation(0);
      continue;
      if (str.equals("1"))
        setRequestedOrientation(1);
      else if (str.equals("2"))
        setRequestedOrientation(0);
    }
  }

  public void onPause()
  {
    super.onPause();
    try
    {
      unregisterReceiver(this.f);
      label12: Utilities.a("LOCK ACTIVITY ON PAUSE");
      return;
    }
    catch (Exception localException)
    {
      break label12;
    }
  }

  public void onResume()
  {
    e = true;
    IntentFilter localIntentFilter = new IntentFilter("com.TwinBlade.PicturePassword.EXIT_LOCK");
    registerReceiver(this.f, localIntentFilter);
    if ((bl.b()) && (this.a.getBoolean("InfoPanel", false)))
    {
      bl localbl2 = bl.a(this, false);
      localbl2.e();
      localbl2.f();
      localbl2.a(false);
    }
    bl localbl1 = bl.a(this, false);
    if (localbl1 != null)
      localbl1.e(false);
    super.onResume();
    Utilities.a("LOCK ACTIVITY ON RESUME");
  }

  public void onWindowFocusChanged(boolean paramBoolean)
  {
    if ((paramBoolean) && (!bl.b()))
    {
      finish();
      overridePendingTransition(0, 0);
    }
    Utilities.a("WINDOW FOCUS CHANGED " + paramBoolean);
    super.onWindowFocusChanged(paramBoolean);
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     com.TwinBlade.PicturePassword.LockActivity
 * JD-Core Version:    0.6.2
 */